#pragma once

#include <d3d9.h>
#include <d3dx9.h>
#include <windows.h>
#include <strsafe.h>
#include <Windows.h>
#include <mmsystem.h>
#include "vertex.h"

class VertBuffer
{
public:
	VertBuffer(void);
	VertBuffer(LPDIRECT3DDEVICE9 pd3dDeviceIn, LPDIRECT3DVERTEXBUFFER9 pVBIn, LPD3DXMATRIXSTACK matStackIn);
	VertBuffer(const VertBuffer& rhs);
	VertBuffer& operator=(const VertBuffer& rhs);
	~VertBuffer(void);
	HRESULT AddVerts(LPD3DXMESH pGeomMesh, D3DMATERIAL9 mtrl);
	void Reset();
	LPD3DXMATRIXSTACK GetMatStack(){return matStack;}
	LPDIRECT3DDEVICE9 GetDevice(){return pd3dDevice;}
private:
	LPDIRECT3DDEVICE9 pd3dDevice; 
	LPDIRECT3DVERTEXBUFFER9 pVB; 
	LPD3DXMATRIXSTACK matStack;
};
